package com.bingxue.edu.teacher.controller;

import com.bingxue.edu.framework.common.model.Response;
import com.bingxue.edu.teacher.model.resp.TeacherStudentDetailResp;
import com.bingxue.edu.teacher.service.TeacherClassStudentService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 教师端-学生模块
 * @author panbo
 * @since 2024/11/11
 */
@Tag(name = "教师端-学生模块")
@RestController
@RequestMapping("/t/student")
@RequiredArgsConstructor
public class TeacherClassStudentController {

    private final TeacherClassStudentService teacherClassStudentService;

    @Operation(summary = "学生信息")
    @GetMapping("/detail/{studentId}")
    public Response<TeacherStudentDetailResp> getStudentDetail(@PathVariable String studentId) {
        TeacherStudentDetailResp detail = teacherClassStudentService.getStudentDetail(studentId);
        return Response.success(detail);
    }
}
